package com.jiyun.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("member")
public class Member implements Serializable {
    @TableId(value = "id",type = IdType.AUTO)
    private Long id;
    @TableField(value = "photo_url")
    private String photoUrl;
    @TableField(value = "member_name")
    private String memberName;
    @TableField(value = "member_no")
    private Long memberNo;
    @TableField(value = "sex")
    private String sex;
    @TableField(value = "idiograph")
    private String idiograph;
    @TableField(value = "join_date")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "Asia/Shanghai")
    private Date joinDate;
    @TableField(value = "member_status")
    private String memberStatus;
    @TableField(value = "member_role_id")
    private Long memberRoleId;
    @TableField(value = "team_id")
    private Long teamId;
    @TableField(value = "is_delete")
    private String isDelete;
    @TableField(value = "password")
    private String password;
    @TableField(value = "username")
    private String username;
    private Integer dianzhantype;



    @TableField(exist = false)
    private String memberRoleName;
}
